#include<stdio.h>

int main()
{
	int sign,num=0;
	for(sign=100;sign<500;sign++){
		if((sign%7==0||sign%11==0)&&sign%77!=0) num++;
	}
	printf("%d",num);
	return 0;
}
